home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / maximus / mul100.zip / BSORT.SCR < prev    next >
Text File  |  1993-02-01  |  2KB  |  52 lines

  1.  
  2. // BSORT.SCR  --  Maximus User Base Sorter  --  Version 1.00
  3. //
  4. // Script program for MUL - the Maximus User Language
  5. // MUL is (C) Copyright 1990-93 by CodeLand Australia
  6.  
  7. // BSORT sorts the user base using the selected method, and rewrites
  8. // the user base. Set the 'sortmethod' variable below to the sort type
  9. // of your preference.
  10.  
  11. char *ufile = "USER.BBS";                   // Path & name of Maximus user file
  12. //char *ufile = "C:\\BBS\\USER.BBS";        // Path & name of Maximus user file
  13.  
  14. // AVAILABLE SORT METHODS:
  15. // IDX_DEFAULT, IDX_FNAME, IDX_LNAME, IDX_CITY, IDX_PWD, IDX_DATE,
  16. // IDX_PRIV, IDX_CALLS, IDX_DNLD, IDX_UPLD, IDX_PHONE
  17.  
  18. int sortmethod = IDX_LNAME;                 // Sort method
  19.  
  20. char *banner = "BSORT v1.00";               // Script banner
  21. char *desc = "Maximus User Base Sorter";    // Description
  22.  
  23. main ()                                     // Main program
  24. {
  25.     printf ("\n%s - %s\n\n",banner,desc);   // Announce
  26.  
  27.     // Open the user base
  28.     if (!BaseOpen (ufile)) {
  29.         printf ("\nERROR opening user file \"%s\"\n\n",ufile);
  30.         saybibi (); exit ();
  31.     }
  32.  
  33.     printf ("Sorting the base .. ");        // Notify
  34.     BaseSort (sortmethod);                  // Sort the user base
  35.  
  36.     printf ("\nRewriting the base .. ");    // Notify
  37.     BasePack (ufile);                       // Rewrite the user file
  38.     printf ("\n");                          // End notify
  39.  
  40.     BaseClose ();                           // Close the user base
  41.     saybibi ();                             // Was it good for you too?
  42. }
  43.  
  44. // Byebye
  45. saybibi ()
  46. {                             
  47.     puts ("\nBSort done!\n");
  48. }
  49.  
  50. // End of script
  51.  
  52.